package com.pojo.parent;


import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.metadata.OrderItem;
import lombok.Data;

import javax.validation.constraints.NotNull;
import java.util.List;

/**
 * @author Huawei
 * @param <T> 返回参数
 * @date 2023-12-31 23:53
 */
@Data
public class PageReq<T> implements IPage<T> {

    private static final long serialVersionUID = 8545996863226528769L;

    /**
     * 当前页
     */
    @NotNull(message = "当前页不能为空")
    private  Integer pageNum;

    /**
     * 页数
     */
    @NotNull(message = "页数不能为空")
    private Integer pageSize;

    /**
     * 查询参数
     */
    private String param;


    public PageReq(Integer  pageNum, Integer pageSize){
        this.pageNum = pageNum;
        this.pageSize = pageSize;
    }

    @Override
    public List<OrderItem> orders() {
        return null;
    }

    @Override
    public List<T> getRecords() {
        return null;
    }

    @Override
    public IPage<T> setRecords(List<T> records) {
        return null;
    }

    @Override
    public long getTotal() {
        return 0;
    }

    @Override
    public IPage<T> setTotal(long total) {
        return null;
    }

    @Override
    public long getSize() {
        return this.pageSize;
    }

    @Override
    public IPage<T> setSize(long size) {
        this.pageSize = (int) size;
        return this;
    }

    @Override
    public long getCurrent() {
        return 0;
    }

    @Override
    public IPage<T> setCurrent(long current) {
        return null;
    }
}
